from django.contrib import sitemaps
from coolblog import models

class BlogSitemap(sitemaps.Sitemap):
    changefreq = "never"
    priority = 0.5

    def items(self):
        return models.Article.get_all()

    def lastmod(self, item):
        return item.last_modify_date

    def location(self, item):
        return '/article/%s/' % item.slug
